Add haptic feedback toggle for code refresh#1599
Add haptic feedback toggle for code refresh#1599alexbakker merged 1 commit intobeemdevelopment:masterfrom
Conversation
alexbakker
left a comment
There was a problem hiding this comment.
Neat! I like this more than I thought I would. I have a couple of comments.
app/src/main/java/com/beemdevelopment/aegis/ui/views/EntryHolder.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/beemdevelopment/aegis/ui/views/EntryListView.java
Outdated
Show resolved
Hide resolved
app/src/main/java/com/beemdevelopment/aegis/helpers/VibrationHelper.java
Outdated
Show resolved
Hide resolved
42ea9df to
79c6fdc
Compare
There was a problem hiding this comment.
I see that the fix for the animation-related crash for entries that have a period of 7 is not included here. Do you want to create a separate PR for that?
| public void onRefresh() { | ||
| refresh(false); | ||
|
|
||
| if (_recyclerView.isShown()) { |
There was a problem hiding this comment.
Do we still need this check now that we stop the refresher when the activity is not visible?
| _refresher.stop(); | ||
| } | ||
|
|
||
| public void onRefreshStart() { |
There was a problem hiding this comment.
Since we're now unconditionally starting the refresher from MainActivity, I think we need to check whether _adapter.getMostFrequentPeriod() returns -1 here and if so not start the refresher. Otherwise, this causes a tight loop in the refresher in case there are no entries in the vault yet. This is also the reason why the instrumented tests are failing.
Improve haptic feedback logic
79c6fdc to
63d2666
Compare
This PR adds the ability to enable/disable haptic feedback when the codes are about to expire or when they refresh.